﻿<%@ Control Language="C#" 
    Inherits="System.Web.Mvc.ViewUserControl<Bookkeeping.Mvc.Models.Budget.PostListViewModel>" %>
    
<div class="postList">
    <table>
        <caption><%=Html.Encode(Model.Title) %></caption>
        <tr>
            <th scope="col">Description</th>
            <th scope="col">Amount</th>
            <th scope="col">Comment</th>
            <th scope="col">Actions</th>
            <th scope="col">Tags</th>
        </tr>
        <% foreach (var post in Model.Posts)
        {
            Html.RenderPartial("Post", post);    
        }%>
        <tr>
            <td scope="row" class="postDescriptionCell postTableTotalDescriptionCell">Total</td>
            <td class="postAmountCell postTableTotalAmountCell <%=Model.TotalAmountCssClass %>">
                <%=Html.Encode(Model.TotalAmountString) %>
            </td>
            <td class="postCommentCell postTableTotalCommentCell">
                The total of all the posts in this table
            </td>
            <td class="postTableTotalActionsCell"></td>
            <td class="postTableTotalTagsCell"></td>
        </tr>
    </table>
</div>